package ua.javatr.android.smb;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

/**
 * Created by Вячеслав on 14.05.2014.
 */
public class CardMenuActivity extends Activity implements CardMenuListFragment.OnCardMenuItemSelectedListener {




    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getFragmentManager().beginTransaction().replace(android.R.id.content, new CardMenuListFragment()).commit();
        getActionBar().setTitle(getIntent().getStringExtra("Header"));
        getActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public void onCardMenuItemSelectedListener(int pos) {
        Intent intent;
        Log.d("MyLogs", String.valueOf(pos));
        switch (pos) {
            case 0:
                intent = new Intent(this, CardOperationsActivity.class);
                startActivity(intent);
                break;
            case 1:
                intent = new Intent(this, CardHistoryListActivity.class);
                startActivity(intent);
                break;
        }
    }


}